import Vue from 'vue'
import App from './App'
import router from './router'

import axios from './axios/index'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '../src/assets/CSS/global.css'

// 注册百度地图
import BaiduMap from 'vue-baidu-map'

import * as echarts from 'echarts'
Vue.use(BaiduMap, { ak: 'tyGBxrYAXHXpD2lTCLyTbmagHmxGV01d' })

// 设置根路径
axios.defaults.baseURL = 'http://127.0.0.1:8081/api/'
// 与Vue实例关联
Vue.prototype.$axios = axios
Vue.use(ElementUI)
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
export default axios.defaults.baseURL
